const router = require('koa-router')();
const result = require("../com/result.js")
const log = require("../com/logConfig.js")
const travelRecordService=require('../service/travelRecordService.js')
router.prefix('/travelRecord')
/**
 * 出行记录 - 最主要是查 
 */

 /**
  * 查满足某些条件的出行记录
  */
router.post('/getRecord', async (ctx, next) => {
    try{
        let result = travelRecordService.getRecord(ctx, next);
        return await result;
    }catch(e){
        log.error('查询出行记录异常',e);
        ctx.body = result.go(result.code.CODE_500);
        return;
    }
});


module.exports = router